package org.cocopapaya.anttsp.domain;

import java.text.DecimalFormat;
import java.util.Random;

import edu.uci.ics.jung.graph.Graph;

public class Path {

	protected static final float LENGTH_SCALE = 10;	
	
	private float length;
	
	private Quantity pheromone = Quantity.newZero();
	
	public float getLength() {
		return length;
	}

	private static Random r = new Random();
	
	public Path() {
		
		this.length = r.nextFloat()*LENGTH_SCALE;
	}

	public String toString() {
		DecimalFormat df = new DecimalFormat("#.##");

		return df.format(this.pheromone.doubleValue());
	}

	
	public Quantity getPheromone() {
		return this.pheromone;
	}

	public double getVisibility() {
		return 1.0/this.length;
	}

	


}
